'use strict';

module.exports = app => {
  // 引入数据类型
  const { INTEGER, BOOLEAN } = app.Sequelize;
  const AtRelation = app.model.define('atRelation', {
    userId: {
      type: INTEGER,
      allowNull: false,
      comment: '用户id',
    },
    blogId: {
      type: INTEGER,
      allowNull: false,
      comment: '博客id',
    },
    isRead: {
      type: BOOLEAN,
      defaultValue: false,
      comment: '是否已读 默认是false',
    },
  });


  return AtRelation;
};
